#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>     
#include <Bitset.h>
void Test1()
{
	bitset<800> bmap;
	int arr[] = { 1, 7, 3, 6, 8, 10, 89, 2, 3, 4, 6, 8, 5, 67, 0 };
	for (auto e : arr)
	{
		bmap.set(e);
	}
	int arr2[] = { 1, 17, 23, 67, 8, 11, 89, 21, 3, 4, 34, 8, 5, 67, 0 };
	for (auto e : arr2)
	{
		cout << e << ":" << bmap.test(e) << endl;
	}
}
void Test2()
{
	bloomfilter<0xffffffff> bf;
	string arr[] = { "zyb", "swk", "jn", "Ronaldo", "ctt", "messi", "yw", "yxq" };
	for (auto& e : arr)
	{
		bf.set(e);
	}
	for (size_t i = 0; i < 50; i++)
	{
		int Randi = rand() % (sizeof(arr) / sizeof(arr[0]));
		cout << arr[Randi] + to_string(rand()) << ":" << bf.test(arr[Randi] += to_string(rand())) << endl;
	}
}
int main()
{
	Test2();
	return 0;
}